package com.amumu.netctoss.action;

import java.util.List;

import javax.annotation.Resource;

import com.amumu.netctoss.dao.ReportDao;
import com.amumu.netctoss.entity.Host;
import com.amumu.netctoss.vo.ClientUsingHost;
import com.amumu.netctoss.vo.DurationClientUsed;

public class ReportAction extends BaseAction {

	@Resource
	private ReportDao dao;
	private List<DurationClientUsed> list;
	private List<ClientUsingHost> list1;
	private List<Host> list2;
	
	public String list(){
		try {
			list = dao.findClient(page, PAGE_SIZE);
			pageCount=dao.getPageCount(PAGE_SIZE);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}
	
	public String list1(){
		try {
			list1 = dao.findClientHost(page, PAGE_SIZE);
			pageCount=dao.getPageCount1(PAGE_SIZE);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}
	
	public String list2(){
		try {
			list2 = dao.findHost(page, PAGE_SIZE);
			pageCount=dao.getPageCount2(PAGE_SIZE);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}
	
	
	//getter and setter
	public List<DurationClientUsed> getList() {
		return list;
	}
	public List<ClientUsingHost> getList1() {
		return list1;
	}
	public List<Host> getList2() {
		return list2;
	}
}
